<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
  </head>

  <body>
  <div>
    
    <div ng-include="headerInclude"></div>
    <div ng-controller="Apiman.ClientPoliciesController"
         class="container-pf-nav-pf-vertical container-fluid page"
         data-field="page"
         ng-cloak=""
         ng-show="pageState == 'loaded'">
      <div ng-include="'plugins/api-manager/html/client/client_bc.include'"></div>
      <!-- Entity Summary Row -->
      <div ng-include="'plugins/api-manager/html/client/client_entity.include'"></div>

      <!-- Navigation + Content Row -->
      <div class="row">
        <!-- Left hand nav -->
        <div ng-include="'plugins/api-manager/html/client/client_tabs.include'"></div>
        <!-- /Left hand nav -->

        <!-- Content -->
        <div class="col-md-10 apiman-entity-content">
          <div class="col-md-9">
            <!-- Title and help text -->
            <div class="title"
                 apiman-i18n-key="client-client-policies">Client App Policies</div>
            <div class="description"
                 apiman-i18n-key="client-policies-help">Here is a list of all policies defined for this Client App. These
              policies will be applied to all API invocations made by the Client App, in addition to whatever policies are
              defined by the API itself.
            </div>
            <hr />
            <!-- The list of policies -->
            <div apiman-permission="clientEdit"
                 apiman-status="Created,Ready,Registered"
                 class="apiman-filters apiman-policies-filters">
              <a apiman-i18n-key="add-policy"
                 href="{{ pluginName }}/orgs/{{ org.id }}/clients/{{ client.id }}/{{ version.version }}/new-policy"
                 class="btn btn-primary pull-right">Add Policy</a>
            </div>
            <div class="clearfix"></div>
            <div class="apiman-policies"
                 data-field="policies">

              <div class="apiman-no-content container-fluid"
                   ng-hide="policies.length > 0">
                <div class="row">
                  <div class="col-md-9">
                    <p class="apiman-no-entities-description"
                       apiman-i18n-key="no-policies-for-client">No policies are defined yet. Use the <strong>Add Policy</strong> button
                      above to define a new policy.</p>
                  </div>
                  <div apiman-permission="apiEdit"
                       apiman-status="Created,Ready,Registered"
                       class="col-md-3">
                    <div class="apiman-no-entities-arrow"></div>
                  </div>
                </div>
              </div>
              <div class="clearfix"></div>
              <apiman-policy-list ng-model="policies"
                                  remove-function="removePolicy"
                                  reorder-function="reorderPolicies"
                                  type="clients"
                                  org-id="{{ org.id }}"
                                  page-id="{{ client.id }}"
                                  version="{{ version.version }}"></apiman-policy-list>
            </div>
          </div>
        </div>
        <!-- /Content -->
      </div>
      
    </div> <!-- /container-pf-nav-pf-vertical container-fluid -->
  </div>
  </body>
</html>
